package com.example.planetandzombiedemo.model;

import android.graphics.Canvas;
import android.graphics.Paint;

/**
 * BaseModel是游戏元素的基础类（植物、僵尸、卡片、子弹）
 */
public abstract class BaseModel {
    //位置
    protected int locationX;
    protected int locationY;
    //生存状态
    protected boolean isAlife;

    //绘制方法
    public abstract void drawSelf(Canvas canvas, Paint paint);
    //获取当前资源对象的宽度
    public abstract int getModelWidth();
    public int getLocationX(){return locationX;};
    public void setLocationX(int locationX){this.locationX=locationX;}
    public int getLocationY(){return locationY;}
    public void setLocationY(int locationY){this.locationY=locationY;}
    public boolean getisAlife(){return isAlife;}
    public void setAlife(boolean isAlife){this.isAlife=isAlife;}
}
